import React from 'react'
import EchartsForReact from 'echarts-for-react'
// 加载主题文件信息的对象
import theme from '../../../style/theme/echarts-theme'

const MonitorChart3 = props => {

    function getOption() {
        let option = {
            title:{
                text: '模型调用次数top10',
                textStyle: {
                    fontSize: '15'
                },
                top: 5,
                left: 5
            },
            toolbox: {
                feature: {
                    saveAsImage: {show: true}
                },
                right: 5,
                top: 5
            },
            xAxis: {
                type: 'category',
                data: ['top1', 'top2', 'top3', 'top4', 'top5', 'top6', 'top7', 'top8', 'top9', 'top10']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [320, 200, 150, 80, 70, 60, 50, 20, 10, 5],
                type: 'bar',
                showBackground: true,
                backgroundStyle: {
                    color: 'rgba(180, 180, 180, 0.2)'
                }
            }]
        }
        return option
    }

    return (
        <div>
            <EchartsForReact 
                option={getOption()}
                theme={theme}
            />
        </div>
    )
}

export default MonitorChart3